package com.group6.companymanagement.service.impl;

import com.group6.companymanagement.entity.Position;
import com.group6.companymanagement.mapper.PositionMapper;
import com.group6.companymanagement.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PositionServiceImpl implements PositionService {
    @Autowired
    private PositionMapper positionMapper;

    @Override
    public List<Position> getAllPositions() {
        return positionMapper.getAllPositions();
    }

    @Override
    public Position getPositionById(Integer id) {
        return positionMapper.getPositionById(id);
    }

    @Override
    public int deletePositionById(Integer id) {
        return positionMapper.deletePositionById(id);
    }

    @Override
    public int addPosition(Position position) {
        return positionMapper.addPosition(position);
    }

    @Override
    public int updatePosition(Position position) {
        return positionMapper.updatePosition(position);
    }

}
